<!DOCTYPE html>
<html lang="en">
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/resource/common/layui/css/layui.css">
    <link rel="stylesheet" href="/resource/js/front/index.css">
</head>
<style>
    #house-user-order + div td .layui-table-cell {
        height: 78px;
        line-height: 79px;
    }
</style>
<body>
<div th:replace="front/head :: heads"></div>
<div class="layui-container userpublic house-userPer">
    <div class="layui-row layui-col-space20">
        <p class="layui-hide-xs title">首页 &gt; <span> </span></p>
        <div th:replace="front/head :: info-nav"></div>
        <div class="layui-col-sm10">
            <div class="layui-tab layui-tab-brief">
                <ul class="layui-tab-title">
                    <li class="layui-this unfinished">未完成订单</li>
                    <li class="drop-shipping">等待发货</li>
                    <li class="receiving">待收货</li>
                    <li class="complete">交易完成</li>
                    <li class="salesReturn">退货中</li>
                </ul>
                <div class="layui-tab-content">
                    <div class="layui-tab-item" style="display: block">
                        <table id="house-user-order" lay-filter="house-user-order"></table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="orderTpl">
    <div style="text-align: left; display: inline-block; vertical-align: middle;">
        <p>订单号：<a style="color: #009fff" href="/front/orderDetails.do?orderId={{d.id}}">{{d.orderid}}</a></p>
        <p>交易时间：{{d.timestamp}}</p>
    </div>
</script>
<script type="text/html" id="priceTpl">
    <div style="display: inline-block; vertical-align: middle;">
        <p>￥{{d.price}}</p>
        <p>免运费</p>
    </div>
</script>
<script type="text/html" id="stateTpl">
    {{#  if(d.status == '未付款'){ }}
    <span style="color: #999;">待付款</span>
    {{#  } else if(d.status == '待发货'&& d.mode!='自取'){ }}
    <span style="color: #ee715f;">待发货</span>
    {{#  } else if(d.status == '待发货'&& d.mode=='自取'){ }}
    <span style="color: #ee715f;">待自取</span>
    {{#  } else if(d.status == '待收货'){ }}
    <span style="color: #ee715f;">待收货</span>
    {{#  } else if(d.status == '交易完成'){ }}
    <span style="color: #73c292;">交易完成</span>
    {{#  } else if(d.status == '退货中'){ }}
    <span style="color: #e39d55;">退货中</span>
    {{#  } else if(d.status == '退货成功'){ }}
    <span style="color: #73c292;">退货成功</span>
    {{#  } }}
</script>
<script type="text/html" id="handleTpl">
    <div style="display: inline-block; vertical-align: middle;">
        {{# if(d.status == '未付款'){ }}
        <a class="handel" lay-event="pay" style="color: #e39d55; cursor: pointer; display: block;">付款</a>
        {{# } else if(d.status == '待发货'&& d.mode!='自取'){ }}
        <a class="handel" lay-event="remind" style="color: #e39d55; cursor: pointer; display: block;">提醒发货</a>
        {{# }else if(d.status == '待收货'){ }}
        <a class="handel" lay-event="check" style="color: #e39d55; cursor: pointer; display: block;">查看物流</a>
        <a class="handel" lay-event="evaluate" style="color: #e39d55; cursor: pointer; display: block;">收货并评价</a>
        {{# }else if(d.status == '交易完成'){ }}
        <a class="handel" lay-event="salesReturn" style="color: #e39d55; cursor: pointer; display: block;">退货</a>
        {{# } }}
    </div>
</script>
<script type="text/javascript" src="/resource/common/layui/layui.js"></script>
<script type="text/javascript" src="/resource/js/front/house.js"></script>
<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script>
    layui.use(['table', 'layer', 'laydate', 'form'], function () {
        var table = layui.table,
            $ = layui.$,
            layer = layui.layer,
            form = layui.form
    });
</script>

</body>
</html>